import request from '@/utils/request'
import { objectToFormData} from '@/utils/form'


export function findPoiList(params) {
  return request({
    url: '/scene/biz/poi/list',
    method: 'get',
    params:params
  })
}

export function savePoi(params) {
  return request({
    url: '/scene/biz/poi/save',
    method: 'post',
    data: objectToFormData(params)
  })
}

export function deletePoi(params) {
  return request({
    url: '/scene/biz/poi/deleteById',
    method: 'get',
    params:params
  })
}

export function getPoiLayer(params) {
  return request({
    url: '/scene/biz/poi/getPoiLayer',
    method: 'get',
    params:params
  })
}

export function saveElementLayer(params) {
  return request({
    url: '/scene/biz/poi/saveElementLayer',
    method: 'post',
    data: objectToFormData(params)
  })
}
